Skip to content

Conversation

@wireblue
Copy link

Upstream dependency xero-php-oauth2 has released 2 new versions (9.x and 10.x). This PR adds support for those.

Tests are passing, coverage is good, no docs appear to need changes.

Breaking Changes

Source: https://github.com/XeroAPI/xero-php-oauth2/releases

v10.1.0: Obsolete endpoints

The following Accounting API methods are marked obsolete and scheduled for removal from 28th April 2026:

  • CreateEmployeesAsync
  • CreateEmployeesAsyncWithHttpInfo
  • CreateEmployeesAsyncWithHttpInfo
  • GetEmployeeAsync
  • GetEmployeeAsyncWithHttpInfo
  • GetEmployeesAsync
  • GetEmployeesAsyncWithHttpInfo
  • UpdateOrCreateEmployeesAsync
  • UpdateOrCreateEmployeesAsyncWithHttpInfo

v10.0.0: New required fields

Payroll models have new mandatory fields:

NZ

  • Employee requires firstName, lastName, dateOfBirth, address
  • Employment requires startDate, engagementType, payrollCalendarID

UK

  • Employee requires firstName, lastName, dateOfBirth, address, gender, title
  • Employment requires startDate, payrollCalendarID, employeeNumber, niCategories

v9.0.0: UK-specific changes

  • Employee model: NICategoryLetter has been marked as deprecated and NICategories added as a new property.
  • Employment POST endpoint. Added NI Categories and removed deprecated niCategory property.

@gemini-code-assist
Copy link

Summary of Changes

Hello @wireblue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the "xero-php-oauth2" dependency to include support for versions 9.x and 10.x. This ensures compatibility with the latest upstream changes, which introduce several breaking changes related to obsolete API endpoints and new mandatory fields in Payroll models for NZ and UK regions. The update maintains existing support for versions 7.1 and 8.0.

Highlights

  • Dependency Upgrade: Upgraded the "xero-php-oauth2" dependency to support versions "9.x" and "10.x", in addition to the existing "7.1" and "8.0" versions.
  • Breaking Changes (v10.1.0): Noted the obsolescence of several Accounting API methods (e.g., CreateEmployeesAsync, GetEmployeeAsync) in "xero-php-oauth2" v10.1.0, which are scheduled for removal from April 28th, 2026.
  • Breaking Changes (v10.0.0): Highlighted new mandatory fields for Payroll models in "xero-php-oauth2" v10.0.0, specifically for NZ (Employee, Employment) and UK (Employee, Employment) regions.
  • Breaking Changes (v9.0.0): Mentioned UK-specific changes in "xero-php-oauth2" v9.0.0, including the deprecation of NICategoryLetter and the addition of NICategories in the Employee model, and related changes to the Employment POST endpoint.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the xero-php-oauth2 dependency to allow versions 9 and 10. The change in composer.json is correct for this purpose. However, this dependency upgrade introduces significant breaking changes, as noted in your pull request description. My main feedback, detailed in a comment on composer.json, is that this change should be part of a new major version release for this package to adhere to semantic versioning. This is critical to ensure users are aware of the potential backward-incompatible changes.

"require": {
"php": "^8.2|^8.3|^8.4",
"xeroapi/xero-php-oauth2": "^7.1|^8.0",
"xeroapi/xero-php-oauth2": "^7.1|^8.0|^9.0|^10.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

While allowing newer versions of xero-php-oauth2 is a good enhancement, versions 9 and 10 introduce significant breaking changes as you've noted in the PR description. To adhere to semantic versioning principles, this change should be accompanied by a new major version release for webfox/laravel-xero-oauth2 (e.g., v5.0.0).

This signals to users that the update contains backward-incompatible changes (even if they are in a dependency) and that they need to review their code for compatibility. Releasing this as a minor or patch version could unexpectedly break users' applications.

I also strongly recommend documenting these breaking changes in CHANGELOG.md as part of the new major release.

This was referenced Nov 18, 2025
@wireblue
Copy link
Author

I've tested these changes on our Laravel app which pulls invoices, contacts and accounts. Everything seems to be ok so far, but would appreciate another set of eyes on things.

@giojanju
Copy link

Hello, are you going to merge this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants